import { CacheModule, Global, Module } from '@nestjs/common';
import { CacheRedisService } from './cache-redis.service';
import * as redisStore from 'cache-manager-redis-store';

@Global()
@Module({
  imports: [
    CacheModule.register({
      store: redisStore,
      port: 6379,
      host: '192.168.137.20',
      db: 0,
      password: '123456',
    }),
  ],
  providers: [CacheRedisService],
  exports: [CacheRedisService],
})
export class CacheRedisModule {}
